<template>
    <div class="leftcon">
        <h2 class="title">{{$t('zichan[0]')}}</h2>
        <ul class="leftmian">
            <li class="listheader">
                <p class="code">{{$t('zichan[1]')}}</p>
                <p class="price">{{$t('zichan[2]')}}</p>
                <p class="changeRate">{{$t('zichan[3]')}}</p>
            </li>
            <li class="list" v-for="(item, index) in Prodata" :key="index" :class="{'ateiv':item.code == codetype}" @click="navclick(item.code)">
                <p class="code">{{item.name}}</p>
                <p class="price">{{$public.toLowFixed(item.price,item.code)}}<span>≈{{$public.toLowFixed(item.cnyPrice, item.code, 2)}}</span></p>
                <p class="changeRate" :class="{'rise':item.change<0, 'fall':item.change>0}">{{item.changeRate}}</p>
            </li>
        </ul>
    </div>
</template>

<script>
export default {
    name: 'contratnav',
        props:['Prodata', 'codetype'],
        data () {
            return {
                
            }
        },
        methods: {
            navclick(data){
                 this.$emit('func', data)
            }
        },
        created(){
        },
        components: {
            
        },
    }
</script>

